//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * consumeHistoryServiceImpl
 * 项目名称:代购系统
 *
 * @author Mengxiangliang
 *
 * 功能描述:
 * 
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * 
 */
 
package com.gamutsoft.amb.consumehistory.service.impl;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.service.impl.GenericServiceImpl;
import com.gamutsoft.amb.consumehistory.dao.IConsumeHistoryDao;
import com.gamutsoft.amb.consumehistory.model.ConsumeHistory;
import com.gamutsoft.amb.consumehistory.service.IConsumeHistoryService;

public class ConsumeHistoryServiceImpl extends GenericServiceImpl<ConsumeHistory, Long> implements IConsumeHistoryService {
	public IConsumeHistoryDao consumeHistoryDao;

    public ConsumeHistoryServiceImpl(IConsumeHistoryDao consumeHistoryDao) {
		super(consumeHistoryDao);
		this.consumeHistoryDao = consumeHistoryDao;
	}
	
	/**
	 * 根据条件查询记录
	 * @author Mengxiangliang
	 * @param  QueryExample
	 * @return ConsumeHistoryList
	 * @throws BusinessException
	 */
	public List<Map> searchConsumeHistoryList(QueryExample qe) throws BusinessException{
	  
	   return consumeHistoryDao.searchConsumeHistoryList(qe);
	   
	}
	
	/**
	 * 根据ID查询记录
	 * @author Mengxiangliang
	 * @param Long id
	 * @return domain
	 * @throws BusinessException
	 */
	public ConsumeHistory searchConsumeHistoryById(Long id) throws BusinessException{
	  
	   return consumeHistoryDao.searchConsumeHistoryById(id);
	   
	}

	/**
	 *  删除记录
	 * @author Mengxiangliang	 
	 * @param id
	 * @throws BusinessException
	 */
	public void deleteConsumeHistoryById(Long id) throws BusinessException{
	 
	  consumeHistoryDao.deleteConsumeHistoryById(id);
	  
	}
	
	/**
	 * 修改记录
	 * @author Mengxiangliang
	 * @param domain
	 * @throws BusinessException
	 */
	public void updateConsumeHistory(ConsumeHistory domain) throws BusinessException{
	
	   consumeHistoryDao.save(domain);
	   
	}

	/**
	 * 新增记录
	 * @author Mengxiangliang
	 * @param domain
	 * @return
	 * @throws BusinessException
	 */
	public void createConsumeHistory(ConsumeHistory domain) throws BusinessException{
	
	   consumeHistoryDao.save(domain);
	}
	

}